FROM php:8.0.8-fpm-buster

MAINTAINER guosheng1987 <guosheng1987@126.com>

RUN sed -i "s/deb.debian.org/mirrors.aliyun.com/g" /etc/apt/sources.list 

RUN apt-get update &&\
    apt-get install -y     libfreetype6-dev libjpeg62-turbo-dev libpng-dev zip unzip git &&\
    docker-php-ext-configure gd --with-freetype --with-jpeg &&\
    docker-php-ext-install -j$(nproc) gd

RUN docker-php-ext-install -j$(nproc) bcmath calendar exif gettext sockets dba mysqli pcntl pdo_mysql shmop sysvmsg sysvsem sysvshm

#pecl 安装扩展 redis
RUN pecl install redis-5.3.2 \
    && docker-php-ext-enable redis \
	&& curl -s https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer 
	
# 修改 composer 为国内镜像
RUN composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

